package com.rhb.erp.hr.person.bean;

import java.text.*;
import java.util.*;

import com.rhb.erp.hr.department.bean.Department;

public class Person implements java.io.Serializable {
	public Person() {
	}

	// -----start personPk-----//
	private String personPk;

	public void setPersonPk(String personPk) {
		this.personPk = personPk;
	}

	public String getPersonPk() {
		return this.personPk;
	}

	// -----end personPk-----//

	// -----start personNo-----//
	private String personNo;

	public void setPersonNo(String personNo) {
		this.personNo = personNo;
	}

	public String getPersonNo() {
		return this.personNo;
	}

	// -----end personNo-----//

	// -----start fullName-----//
	private String fullName;

	public void setFullName(String fullName) {
		this.fullName = fullName;
	}

	public String getFullName() {
		return this.fullName;
	}

	// -----end fullName-----//
	private Department department = new Department();

	// -----start sex-----//
	private String sex;

	public void setSex(String sex) {
		this.sex = sex;
	}

	public String getSex() {
		return this.sex;
	}

	// -----end sex-----//

	// -----start nationality-----//
	private String nationality;

	public void setNationality(String nationality) {
		this.nationality = nationality;
	}

	public String getNationality() {
		return this.nationality;
	}

	// -----end nationality-----//

	// -----start nationPlace-----//
	private String nationPlace;

	public void setNationPlace(String nationPlace) {
		this.nationPlace = nationPlace;
	}

	public String getNationPlace() {
		return this.nationPlace;
	}

	// -----end nationPlace-----//

	// -----start identityCardNo-----//
	private String identityCardNo;

	public void setIdentityCardNo(String identityCardNo) {
		this.identityCardNo = identityCardNo;
	}

	public String getIdentityCardNo() {
		return this.identityCardNo;
	}

	// -----end identityCardNo-----//

	// -----start socialInsuranceNo-----//
	private String socialInsuranceNo;

	public void setSocialInsuranceNo(String socialInsuranceNo) {
		this.socialInsuranceNo = socialInsuranceNo;
	}

	public String getSocialInsuranceNo() {
		return this.socialInsuranceNo;
	}

	// -----end socialInsuranceNo-----//

	// -----start address-----//
	private String address;

	public void setAddress(String address) {
		this.address = address;
	}

	public String getAddress() {
		return this.address;
	}

	// -----end address-----//

	// -----start phone-----//
	private String phone;

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getPhone() {
		return this.phone;
	}

	// -----end phone-----//

	// -----start email-----//
	private String email;

	public void setEmail(String email) {
		this.email = email;
	}

	public String getEmail() {
		return this.email;
	}

	// -----end email-----//

	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((personPk == null) ? 0 : personPk.hashCode());
		result = prime * result
				+ ((personNo == null) ? 0 : personNo.hashCode());
		result = prime * result
				+ ((fullName == null) ? 0 : fullName.hashCode());
		result = prime * result + ((sex == null) ? 0 : sex.hashCode());
		result = prime * result
				+ ((nationality == null) ? 0 : nationality.hashCode());
		result = prime * result
				+ ((nationPlace == null) ? 0 : nationPlace.hashCode());
		result = prime * result
				+ ((identityCardNo == null) ? 0 : identityCardNo.hashCode());
		result = prime
				* result
				+ ((socialInsuranceNo == null) ? 0 : socialInsuranceNo
						.hashCode());
		result = prime * result + ((address == null) ? 0 : address.hashCode());
		result = prime * result + ((phone == null) ? 0 : phone.hashCode());
		result = prime * result + ((email == null) ? 0 : email.hashCode());
		return result;
	}

	public boolean equals(Object obj) {
		if (this == obj)
			return true;

		if (obj == null)
			return false;

		if (getClass() != obj.getClass())
			return false;

		final Person other = (Person) obj;

		if (personPk == null) {
			if (other.personPk != null)
				return false;
		} else if (!personPk.equals(other.personPk))
			return false;
		if (personNo == null) {
			if (other.personNo != null)
				return false;
		} else if (!personNo.equals(other.personNo))
			return false;
		if (fullName == null) {
			if (other.fullName != null)
				return false;
		} else if (!fullName.equals(other.fullName))
			return false;
		if (sex == null) {
			if (other.sex != null)
				return false;
		} else if (!sex.equals(other.sex))
			return false;
		if (nationality == null) {
			if (other.nationality != null)
				return false;
		} else if (!nationality.equals(other.nationality))
			return false;
		if (nationPlace == null) {
			if (other.nationPlace != null)
				return false;
		} else if (!nationPlace.equals(other.nationPlace))
			return false;
		if (identityCardNo == null) {
			if (other.identityCardNo != null)
				return false;
		} else if (!identityCardNo.equals(other.identityCardNo))
			return false;
		if (socialInsuranceNo == null) {
			if (other.socialInsuranceNo != null)
				return false;
		} else if (!socialInsuranceNo.equals(other.socialInsuranceNo))
			return false;
		if (address == null) {
			if (other.address != null)
				return false;
		} else if (!address.equals(other.address))
			return false;
		if (phone == null) {
			if (other.phone != null)
				return false;
		} else if (!phone.equals(other.phone))
			return false;
		if (email == null) {
			if (other.email != null)
				return false;
		} else if (!email.equals(other.email))
			return false;

		return true;
	}

	public Department getDepartment() {
		return department;
	}

	public void setDepartment(Department department) {
		this.department = department;
	}
}
